<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.13"/>
<meta name="viewport" content="width=device-width, initial-scale=1"/>
<title>Global Body Planner: TerrainMapPublisher Class Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">Global Body Planner
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.13 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
<script type="text/javascript" src="menudata.js"></script>
<script type="text/javascript" src="menu.js"></script>
<script type="text/javascript">
$(function() {
  initMenu('',true,false,'search.php','Search');
  $(document).ready(function() { init_search(); });
});
</script>
<div id="main-nav"></div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#pub-methods">Public Member Functions</a> &#124;
<a href="#pri-attribs">Private Attributes</a> &#124;
<a href="classTerrainMapPublisher-members.html">List of all members</a>  </div>
  <div class="headertitle">
<div class="title">TerrainMapPublisher Class Reference</div>  </div>
</div><!--header-->
<div class="contents">

<p>A terrain map publishing class.  
 <a href="classTerrainMapPublisher.html#details">More...</a></p>

<p><code>#include &lt;<a class="el" href="terrain__map__publisher_8h_source.html">terrain_map_publisher.h</a>&gt;</code></p>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:a0a8d623893002835ad1efd85b2fd321b"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTerrainMapPublisher.html#a0a8d623893002835ad1efd85b2fd321b">TerrainMapPublisher</a> (ros::NodeHandle nh)</td></tr>
<tr class="memdesc:a0a8d623893002835ad1efd85b2fd321b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Constructor for <a class="el" href="classTerrainMapPublisher.html" title="A terrain map publishing class. ">TerrainMapPublisher</a> Class.  <a href="#a0a8d623893002835ad1efd85b2fd321b">More...</a><br /></td></tr>
<tr class="separator:a0a8d623893002835ad1efd85b2fd321b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a295ac03389590d98c589d2d58990b64e"><td class="memItemLeft" align="right" valign="top"><a id="a295ac03389590d98c589d2d58990b64e"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTerrainMapPublisher.html#a295ac03389590d98c589d2d58990b64e">createMap</a> ()</td></tr>
<tr class="memdesc:a295ac03389590d98c589d2d58990b64e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Creates the map object from scratch. <br /></td></tr>
<tr class="separator:a295ac03389590d98c589d2d58990b64e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad3f41fb79f4056c0c7a145f3c0061786"><td class="memItemLeft" align="right" valign="top">std::vector&lt; std::vector&lt; double &gt; &gt;&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTerrainMapPublisher.html#ad3f41fb79f4056c0c7a145f3c0061786">loadCSV</a> (std::string filename)</td></tr>
<tr class="memdesc:ad3f41fb79f4056c0c7a145f3c0061786"><td class="mdescLeft">&#160;</td><td class="mdescRight">Loads data from a specified CSV file into a nested std::vector structure.  <a href="#ad3f41fb79f4056c0c7a145f3c0061786">More...</a><br /></td></tr>
<tr class="separator:ad3f41fb79f4056c0c7a145f3c0061786"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a633f664cc608dc2478948c829c22c97d"><td class="memItemLeft" align="right" valign="top"><a id="a633f664cc608dc2478948c829c22c97d"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTerrainMapPublisher.html#a633f664cc608dc2478948c829c22c97d">loadMapFromCSV</a> ()</td></tr>
<tr class="memdesc:a633f664cc608dc2478948c829c22c97d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Loads data into the map object from a CSV. <br /></td></tr>
<tr class="separator:a633f664cc608dc2478948c829c22c97d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a5d8c63f68d1256f06db6159876ce2100"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTerrainMapPublisher.html#a5d8c63f68d1256f06db6159876ce2100">loadMapFromImage</a> (const sensor_msgs::Image &amp;msg)</td></tr>
<tr class="memdesc:a5d8c63f68d1256f06db6159876ce2100"><td class="mdescLeft">&#160;</td><td class="mdescRight">Loads data into the map object from an image topic.  <a href="#a5d8c63f68d1256f06db6159876ce2100">More...</a><br /></td></tr>
<tr class="separator:a5d8c63f68d1256f06db6159876ce2100"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa11b7631c0f0c3c33f9a118be181a102"><td class="memItemLeft" align="right" valign="top"><a id="aa11b7631c0f0c3c33f9a118be181a102"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTerrainMapPublisher.html#aa11b7631c0f0c3c33f9a118be181a102">publishMap</a> ()</td></tr>
<tr class="memdesc:aa11b7631c0f0c3c33f9a118be181a102"><td class="mdescLeft">&#160;</td><td class="mdescRight">Publishes map data to the terrain_map topic. <br /></td></tr>
<tr class="separator:aa11b7631c0f0c3c33f9a118be181a102"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a05d219e0cf2b9684029f79e3ec8de424"><td class="memItemLeft" align="right" valign="top"><a id="a05d219e0cf2b9684029f79e3ec8de424"></a>
void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTerrainMapPublisher.html#a05d219e0cf2b9684029f79e3ec8de424">spin</a> ()</td></tr>
<tr class="memdesc:a05d219e0cf2b9684029f79e3ec8de424"><td class="mdescLeft">&#160;</td><td class="mdescRight">Calls ros spinOnce and pubs data at set frequency. <br /></td></tr>
<tr class="separator:a05d219e0cf2b9684029f79e3ec8de424"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pri-attribs"></a>
Private Attributes</h2></td></tr>
<tr class="memitem:abb161fa5dcd81d1ef132b29e0ebe9a29"><td class="memItemLeft" align="right" valign="top"><a id="abb161fa5dcd81d1ef132b29e0ebe9a29"></a>
ros::Subscriber&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTerrainMapPublisher.html#abb161fa5dcd81d1ef132b29e0ebe9a29">image_sub_</a></td></tr>
<tr class="memdesc:abb161fa5dcd81d1ef132b29e0ebe9a29"><td class="mdescLeft">&#160;</td><td class="mdescRight">ROS Subscriber for image data. <br /></td></tr>
<tr class="separator:abb161fa5dcd81d1ef132b29e0ebe9a29"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0a60e93d610ec49cff3ddac21e0c164b"><td class="memItemLeft" align="right" valign="top"><a id="a0a60e93d610ec49cff3ddac21e0c164b"></a>
ros::Publisher&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTerrainMapPublisher.html#a0a60e93d610ec49cff3ddac21e0c164b">terrain_map_pub_</a></td></tr>
<tr class="memdesc:a0a60e93d610ec49cff3ddac21e0c164b"><td class="mdescLeft">&#160;</td><td class="mdescRight">ROS Publisher for the terrain map. <br /></td></tr>
<tr class="separator:a0a60e93d610ec49cff3ddac21e0c164b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae99cba5723122187783469f150268630"><td class="memItemLeft" align="right" valign="top"><a id="ae99cba5723122187783469f150268630"></a>
ros::NodeHandle&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTerrainMapPublisher.html#ae99cba5723122187783469f150268630">nh_</a></td></tr>
<tr class="memdesc:ae99cba5723122187783469f150268630"><td class="mdescLeft">&#160;</td><td class="mdescRight">Nodehandle to pub to and sub from. <br /></td></tr>
<tr class="separator:ae99cba5723122187783469f150268630"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a0acbdc1ceea7069aaef82f4c18388fb2"><td class="memItemLeft" align="right" valign="top"><a id="a0acbdc1ceea7069aaef82f4c18388fb2"></a>
double&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTerrainMapPublisher.html#a0acbdc1ceea7069aaef82f4c18388fb2">update_rate_</a></td></tr>
<tr class="memdesc:a0acbdc1ceea7069aaef82f4c18388fb2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Update rate for sending and receiving data, unused since pubs are called in callbacks. <br /></td></tr>
<tr class="separator:a0acbdc1ceea7069aaef82f4c18388fb2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ab72c50bd278bec6f1870d7098f1f1eed"><td class="memItemLeft" align="right" valign="top"><a id="ab72c50bd278bec6f1870d7098f1f1eed"></a>
std::string&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTerrainMapPublisher.html#ab72c50bd278bec6f1870d7098f1f1eed">map_frame_</a></td></tr>
<tr class="memdesc:ab72c50bd278bec6f1870d7098f1f1eed"><td class="mdescLeft">&#160;</td><td class="mdescRight">Handle for the map frame. <br /></td></tr>
<tr class="separator:ab72c50bd278bec6f1870d7098f1f1eed"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a87ef6e36fae57a1e151014937ee3d02f"><td class="memItemLeft" align="right" valign="top"><a id="a87ef6e36fae57a1e151014937ee3d02f"></a>
grid_map::GridMap&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTerrainMapPublisher.html#a87ef6e36fae57a1e151014937ee3d02f">terrain_map_</a></td></tr>
<tr class="memdesc:a87ef6e36fae57a1e151014937ee3d02f"><td class="mdescLeft">&#160;</td><td class="mdescRight">GridMap object for terrain data. <br /></td></tr>
<tr class="separator:a87ef6e36fae57a1e151014937ee3d02f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aac004d967077b8433018cdcf6f51c384"><td class="memItemLeft" align="right" valign="top"><a id="aac004d967077b8433018cdcf6f51c384"></a>
std::string&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTerrainMapPublisher.html#aac004d967077b8433018cdcf6f51c384">map_data_source_</a></td></tr>
<tr class="memdesc:aac004d967077b8433018cdcf6f51c384"><td class="mdescLeft">&#160;</td><td class="mdescRight">String of the source of the terrain map data. <br /></td></tr>
<tr class="separator:aac004d967077b8433018cdcf6f51c384"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a86d3497f911cbec8d7d250cfce4d403a"><td class="memItemLeft" align="right" valign="top"><a id="a86d3497f911cbec8d7d250cfce4d403a"></a>
std::string&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTerrainMapPublisher.html#a86d3497f911cbec8d7d250cfce4d403a">terrain_type_</a></td></tr>
<tr class="memdesc:a86d3497f911cbec8d7d250cfce4d403a"><td class="mdescLeft">&#160;</td><td class="mdescRight">String of terrain type (if loading from csv) <br /></td></tr>
<tr class="separator:a86d3497f911cbec8d7d250cfce4d403a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:acde2f6690426b3aa1de411b260f5517b"><td class="memItemLeft" align="right" valign="top"><a id="acde2f6690426b3aa1de411b260f5517b"></a>
bool&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTerrainMapPublisher.html#acde2f6690426b3aa1de411b260f5517b">map_initialized_</a> = false</td></tr>
<tr class="memdesc:acde2f6690426b3aa1de411b260f5517b"><td class="mdescLeft">&#160;</td><td class="mdescRight">Bool to flag if the map has been initialized yet. <br /></td></tr>
<tr class="separator:acde2f6690426b3aa1de411b260f5517b"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a01d73a9b142c5cd7457feb50045dc370"><td class="memItemLeft" align="right" valign="top"><a id="a01d73a9b142c5cd7457feb50045dc370"></a>
double&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTerrainMapPublisher.html#a01d73a9b142c5cd7457feb50045dc370">resolution_</a></td></tr>
<tr class="memdesc:a01d73a9b142c5cd7457feb50045dc370"><td class="mdescLeft">&#160;</td><td class="mdescRight">Double for map resolution. <br /></td></tr>
<tr class="separator:a01d73a9b142c5cd7457feb50045dc370"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aa22f46f8003f8963e383f342387c09dc"><td class="memItemLeft" align="right" valign="top"><a id="aa22f46f8003f8963e383f342387c09dc"></a>
double&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTerrainMapPublisher.html#aa22f46f8003f8963e383f342387c09dc">min_height_</a></td></tr>
<tr class="memdesc:aa22f46f8003f8963e383f342387c09dc"><td class="mdescLeft">&#160;</td><td class="mdescRight">Double for map resolution. <br /></td></tr>
<tr class="separator:aa22f46f8003f8963e383f342387c09dc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af6938ddec68646380135b2d22b7a2498"><td class="memItemLeft" align="right" valign="top"><a id="af6938ddec68646380135b2d22b7a2498"></a>
double&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTerrainMapPublisher.html#af6938ddec68646380135b2d22b7a2498">max_height_</a></td></tr>
<tr class="memdesc:af6938ddec68646380135b2d22b7a2498"><td class="mdescLeft">&#160;</td><td class="mdescRight">Double for map resolution. <br /></td></tr>
<tr class="separator:af6938ddec68646380135b2d22b7a2498"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>A terrain map publishing class. </p>
<p><a class="el" href="classTerrainMapPublisher.html" title="A terrain map publishing class. ">TerrainMapPublisher</a> is a class for publishing terrain maps from a variety of sources, including from scratch. </p>
</div><h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a id="a0a8d623893002835ad1efd85b2fd321b"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a0a8d623893002835ad1efd85b2fd321b">&#9670;&nbsp;</a></span>TerrainMapPublisher()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">TerrainMapPublisher::TerrainMapPublisher </td>
          <td>(</td>
          <td class="paramtype">ros::NodeHandle&#160;</td>
          <td class="paramname"><em>nh</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Constructor for <a class="el" href="classTerrainMapPublisher.html" title="A terrain map publishing class. ">TerrainMapPublisher</a> Class. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">nh</td><td>ROS NodeHandle to publish and subscribe from </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Constructed object of type <a class="el" href="classTerrainMapPublisher.html" title="A terrain map publishing class. ">TerrainMapPublisher</a> </dd></dl>

</div>
</div>
<h2 class="groupheader">Member Function Documentation</h2>
<a id="ad3f41fb79f4056c0c7a145f3c0061786"></a>
<h2 class="memtitle"><span class="permalink"><a href="#ad3f41fb79f4056c0c7a145f3c0061786">&#9670;&nbsp;</a></span>loadCSV()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">std::vector&lt; std::vector&lt; double &gt; &gt; TerrainMapPublisher::loadCSV </td>
          <td>(</td>
          <td class="paramtype">std::string&#160;</td>
          <td class="paramname"><em>filename</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Loads data from a specified CSV file into a nested std::vector structure. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">filename</td><td>Path to the CSV file </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>Data from the CSV in vector structure </dd></dl>

</div>
</div>
<a id="a5d8c63f68d1256f06db6159876ce2100"></a>
<h2 class="memtitle"><span class="permalink"><a href="#a5d8c63f68d1256f06db6159876ce2100">&#9670;&nbsp;</a></span>loadMapFromImage()</h2>

<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void TerrainMapPublisher::loadMapFromImage </td>
          <td>(</td>
          <td class="paramtype">const sensor_msgs::Image &amp;&#160;</td>
          <td class="paramname"><em>msg</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Loads data into the map object from an image topic. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramdir">[in]</td><td class="paramname">msg</td><td>ROS image message </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<hr/>The documentation for this class was generated from the following files:<ul>
<li>include/global_body_planner/<a class="el" href="terrain__map__publisher_8h_source.html">terrain_map_publisher.h</a></li>
<li>src/terrain_map_publisher.cpp</li>
</ul>
</div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.13
</small></address>
</body>
</html>
